#pragma once

#include "Material.h"

/**
 * This is a TEST material to use stateful material to compute pyrolysising rho . 
 */
class StatefulRhoMaterial : public Material
{
public:
	static InputParameters validParams();

	StatefulRhoMaterial(const InputParameters& parameters);

protected:
	virtual void initQpStatefulProperties();
	virtual void computeQpProperties();
	Real Source(Real rho, Real T, Real T_begin, Real rhoc, Real rhov, Real precoff, Real ER, Real reaction_level);
	MaterialProperty<Real>& _T_begin;
	MaterialProperty<Real>& _precofficient;
	MaterialProperty<Real>& _ER;
	MaterialProperty<Real>& _reaction_level;
	MaterialProperty<Real>& _rhov;
	MaterialProperty<Real>& _rhoc;
	MaterialProperty<Real>& _rhos;
	
	MaterialProperty<Real>& _pyrolysis_source;
   //get varialbles
	const VariableValue& _T_value;
	const MaterialProperty<Real>& _rhos_old;
	//get Regular thermal properties
	Real  _rho_v_value;
	Real  _rho_c_value;
	//get special parameters to compute pyrolysis Arrhenius relation
	Real  _T_begin_value;
	Real  _precoff_value;
	Real  _ER_value;
	Real  _reaction_level_value;
};